/* 最终数据管理页面样式 */

/* 移除导航栏样式覆盖，使用common.css中的统一样式 */

/* 统计卡片 */
.stat-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 15px;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.stat-value {
    font-size: 24px;
    font-weight: bold;
}

.stat-label {
    font-size: 12px;
    opacity: 0.9;
    margin-top: 5px;
}

/* 筛选面板 */
.filter-select-container {
    position: relative;
}

.filter-select-container select {
    height: auto;
    min-height: 38px;
}

.logic-switch {
    margin-top: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.logic-switch .btn-group-sm .btn {
    padding: 2px 8px;
    font-size: 11px;
}

/* 字段显示控制 */
#fieldCheckboxes {
    max-height: 200px;
    overflow-y: auto;
}

#fieldCheckboxes .col-md-3 {
    padding: 5px;
}

.field-checkbox {
    margin-bottom: 5px;
}

.field-checkbox input[type="checkbox"] {
    margin-right: 8px;
}

.field-checkbox label {
    font-size: 14px;
    margin-bottom: 0;
    cursor: pointer;
}

/* 数据卡片 */
.data-card {
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
    background: white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: box-shadow 0.2s ease;
}

.data-card:hover {
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.data-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid #eee;
}

.data-card-id {
    font-size: 12px;
    color: #6c757d;
    font-family: monospace;
}

.data-card-language {
    background: #e9ecef;
    color: #495057;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
}

.data-card-field {
    margin-bottom: 10px;
}

.data-card-field-label {
    font-weight: 600;
    color: #495057;
    font-size: 13px;
    margin-bottom: 4px;
}

.data-card-field-content {
    color: #333;
    font-size: 14px;
    line-height: 1.4;
}

.data-card-field-content.truncated {
    max-height: 60px;
    overflow: hidden;
    position: relative;
}

.data-card-field-content.truncated::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 100%;
    height: 20px;
    background: linear-gradient(transparent, white);
}

.data-card-field-content.expanded {
    max-height: none;
    overflow: visible;
}

.data-card-field-content.expanded::after {
    display: none;
}

.expand-btn {
    color: #007bff;
    cursor: pointer;
    font-size: 12px;
    text-decoration: underline;
}

.expand-btn:hover {
    color: #0056b3;
}

/* 标签样式 */
.tag {
    display: inline-block;
    background: #f8f9fa;
    color: #495057;
    padding: 2px 8px;
    margin: 2px;
    border-radius: 12px;
    font-size: 11px;
    border: 1px solid #dee2e6;
}

.tag.domain-tag {
    background: #d4edda;
    color: #155724;
    border-color: #c3e6cb;
}

.tag.entity-tag {
    background: #d1ecf1;
    color: #0c5460;
    border-color: #bee5eb;
}

/* 表格样式 */
#dataTable {
    font-size: 14px;
}

#dataTable th {
    background: #f8f9fa;
    font-weight: 600;
    border-bottom: 2px solid #dee2e6;
    white-space: nowrap;
}

#dataTable td {
    vertical-align: top;
    max-width: 200px;
    word-wrap: break-word;
}

.table-cell-content {
    max-height: 80px;
    overflow: hidden;
    position: relative;
}

.table-cell-content.expanded {
    max-height: none;
}

.table-expand-btn {
    color: #007bff;
    cursor: pointer;
    font-size: 11px;
    text-decoration: underline;
    margin-top: 5px;
    display: block;
}

/* 分页样式 */
.pagination .page-link {
    color: #007bff;
    border-color: #dee2e6;
}

.pagination .page-item.active .page-link {
    background-color: #007bff;
    border-color: #007bff;
}

.pagination .page-item.disabled .page-link {
    color: #6c757d;
}

.pagination-info {
    font-size: 14px;
    color: #6c757d;
}

/* 页面大小选择器样式 */
#pageSizeSelect {
    min-width: 80px;
}

/* 加载状态 */
#loadingSpinner {
    padding: 40px;
}

/* 视图切换按钮 */
.btn-group .btn.active {
    background-color: #007bff;
    border-color: #007bff;
    color: white;
}

/* 搜索高亮 */
.search-highlight {
    background-color: #fff3cd;
    padding: 1px 2px;
    border-radius: 2px;
}

/* 操作按钮区域样式 */
.action-buttons {
    gap: 0.25rem;
}

.action-buttons .btn {
    font-size: 12px;
    padding: 4px 8px;
    white-space: nowrap;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .stat-card {
        margin-bottom: 10px;
    }
    
    .data-card {
        padding: 10px;
    }
    
    .data-card-field-label {
        font-size: 12px;
    }
    
    .data-card-field-content {
        font-size: 13px;
    }
    
    .btn-group .btn {
        font-size: 12px;
        padding: 6px 12px;
    }
    
    #dataTable {
        font-size: 12px;
    }
    
    #dataTable td {
        max-width: 150px;
    }
    
    /* 移动端按钮调整 */
    .action-buttons {
        justify-content: flex-start !important;
        flex-direction: column;
        align-items: stretch !important;
    }
    
    .action-buttons .btn {
        font-size: 11px;
        padding: 8px 12px;
        margin: 2px 0 !important;
        width: 100%;
        text-align: center;
    }
    
    /* 移动端统计卡片在小屏幕上的响应式布局 */
    .col-lg-4.col-md-12 .d-flex {
        justify-content: center !important;
        align-items: center !important;
        margin-top: 15px;
    }
    
    .col-lg-4.col-md-12 .action-buttons {
        width: 100%;
        max-width: 300px;
    }
}

/* 大屏幕优化 */
@media (min-width: 1400px) {
    .action-buttons .btn {
        font-size: 13px;
        padding: 5px 10px;
    }
}

/* 模态框样式 */
#dataDetailModal .modal-body {
    max-height: 70vh;
    overflow-y: auto;
}

.detail-field {
    margin-bottom: 20px;
    padding: 15px;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    background: #f8f9fa;
}

.detail-field-label {
    font-weight: 600;
    color: #495057;
    margin-bottom: 8px;
    font-size: 14px;
}

.detail-field-content {
    color: #333;
    font-size: 14px;
    line-height: 1.5;
    white-space: pre-wrap;
}

.detail-field-content pre {
    background: white;
    padding: 10px;
    border-radius: 4px;
    font-size: 13px;
    border: 1px solid #dee2e6;
}

/* 筛选状态指示 */
.filter-indicator {
    position: absolute;
    top: -5px;
    right: -5px;
    width: 10px;
    height: 10px;
    background: #dc3545;
    border-radius: 50%;
    display: none;
}

.filter-active .filter-indicator {
    display: block;
}

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #6c757d;
}

.empty-state i {
    font-size: 48px;
    margin-bottom: 20px;
    opacity: 0.5;
}

.empty-state h5 {
    margin-bottom: 10px;
}

.empty-state p {
    margin-bottom: 0;
    font-size: 14px;
} 